Lagrange's Four-square Theorem
   HOME

TheInfoList



OR:

Lagrange's four-square theorem, also known as Bachet's conjecture, states that every
natural number In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country"). Numbers used for counting are called ''Cardinal n ...
can be represented as the sum of four integer
square In Euclidean geometry, a square is a regular quadrilateral, which means that it has four equal sides and four equal angles (90-degree angles, π/2 radian angles, or right angles). It can also be defined as a rectangle with two equal-length adj ...
s. That is, the squares form an additive basis of order four. p = a_0^2 + a_1^2 + a_2^2 + a_3^2 where the four numbers a_0, a_1, a_2, a_3 are integers. For illustration, 3, 31, and 310 in several ways, can be represented as the sum of four squares as follows: \begin 3 & = 1^2+1^2+1^2+0^2 \\ pt31 & = 5^2+2^2+1^2+1^2 \\ pt310 & = 17^2+4^2+2^2+1^2 \\ pt& = 16^2 + 7^2 + 2^2 +1^2 \\ pt& = 15^2 + 9^2 + 2^2 +0^2 \\ pt& = 12^2 + 11^2 + 6^2 + 3^2. \end This theorem was proven by
Joseph Louis Lagrange Joseph-Louis Lagrange (born Giuseppe Luigi LagrangiaFermat polygonal number theorem In additive number theory, the Fermat polygonal number theorem states that every positive integer is a sum of at most -gonal numbers. That is, every positive integer can be written as the sum of three or fewer triangular numbers, and as the sum ...
.


Historical development

From examples given in the '' Arithmetica,'' it is clear that
Diophantus Diophantus of Alexandria ( grc, Διόφαντος ὁ Ἀλεξανδρεύς; born probably sometime between AD 200 and 214; died around the age of 84, probably sometime between AD 284 and 298) was an Alexandrian mathematician, who was the aut ...
was aware of the theorem. This book was translated in 1621 into Latin by Bachet (Claude Gaspard Bachet de Méziriac), who stated the theorem in the notes of his translation. But the theorem was not proved until 1770 by Lagrange.
Adrien-Marie Legendre Adrien-Marie Legendre (; ; 18 September 1752 – 9 January 1833) was a French mathematician who made numerous contributions to mathematics. Well-known and important concepts such as the Legendre polynomials and Legendre transformation are name ...
extended the theorem in 1797–8 with his three-square theorem, by proving that a positive integer can be expressed as the sum of three squares if and only if it is not of the form 4^k(8m+7) for integers and . Later, in 1834,
Carl Gustav Jakob Jacobi Carl Gustav Jacob Jacobi (; ; 10 December 1804 – 18 February 1851) was a German mathematician who made fundamental contributions to elliptic functions, dynamics, differential equations, determinants, and number theory. His name is occasional ...
discovered a simple formula for the number of representations of an integer as the sum of four squares with his own four-square theorem. The formula is also linked to
Descartes' theorem In geometry, Descartes' theorem states that for every four kissing, or mutually tangent, circles, the radii of the circles satisfy a certain quadratic equation. By solving this equation, one can construct a fourth circle tangent to three given, mu ...
of four "kissing circles", which involves the sum of the squares of the curvatures of four circles. This is also linked to
Apollonian gasket In mathematics, an Apollonian gasket or Apollonian net is a fractal generated by starting with a triple of circles, each tangent to the other two, and successively filling in more circles, each tangent to another three. It is named after Greek ...
s, which were more recently related to the
Ramanujan–Petersson conjecture In mathematics, the Ramanujan conjecture, due to , states that Ramanujan's tau function given by the Fourier coefficients of the cusp form of weight :\Delta(z)= \sum_\tau(n)q^n=q\prod_\left (1-q^n \right)^ = q-24q^2+252q^3- 1472q^4 + 4830q^5-\ ...
.


Proofs


The classical proof

Several very similar modern versions of Lagrange's proof exist. The proof below is a slightly simplified version, in which the cases for which ''m'' is even or odd do not require separate arguments.


Proof using the Hurwitz integers

Another way to prove the theorem relies on
Hurwitz quaternion In mathematics, a Hurwitz quaternion (or Hurwitz integer) is a quaternion whose components are ''either'' all integers ''or'' all half-integers (halves of odd integers; a mixture of integers and half-integers is excluded). The set of all Hurwitz qu ...
s, which are the analog of
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
s for
quaternion In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quatern ...
s..


Generalizations

Lagrange's four-square theorem is a special case of the
Fermat polygonal number theorem In additive number theory, the Fermat polygonal number theorem states that every positive integer is a sum of at most -gonal numbers. That is, every positive integer can be written as the sum of three or fewer triangular numbers, and as the sum ...
and
Waring's problem In number theory, Waring's problem asks whether each natural number ''k'' has an associated positive integer ''s'' such that every natural number is the sum of at most ''s'' natural numbers raised to the power ''k''. For example, every natural numb ...
. Another possible generalization is the following problem: Given
natural number In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country"). Numbers used for counting are called ''Cardinal n ...
s a,b,c,d, can we solve n=ax_1^2+bx_2^2+cx_3^2+dx_4^2 for all positive integers in integers x_1,x_2,x_3,x_4? The case a=b=c=d=1 is answered in the positive by Lagrange's four-square theorem. The general solution was given by Ramanujan. He proved that if we assume, without loss of generality, that a\leq b\leq c\leq d then there are exactly 54 possible choices for a,b,c,d such that the problem is solvable in integers x_1,x_2,x_3,x_4 for all . (Ramanujan listed a 55th possibility a=1,b=2,c=5,d=5, but in this case the problem is not solvable if n=15.)


Algorithms

In 1986,
Michael O. Rabin Michael Oser Rabin ( he, מִיכָאֵל עוזר רַבִּין; born September 1, 1931) is an Israeli mathematician and computer scientist and a recipient of the Turing Award. Biography Early life and education Rabin was born in 1931 in ...
and
Jeffrey Shallit Jeffrey Outlaw Shallit (born October 17, 1957) is a computer scientist, number theorist, and a noted critic of intelligent design. He is married to Anna Lubiw, also a computer scientist. Early life and education Shallit was born in Philadelp ...
proposed
randomized In common usage, randomness is the apparent or actual lack of pattern or predictability in events. A random sequence of events, symbols or steps often has no order and does not follow an intelligible pattern or combination. Individual ra ...
polynomial-time algorithm In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by t ...
s for computing a single representation n=x_1^2+x_2^2+x_3^2+x_4^2 for a given integer , in expected running time \mathrm(\log(n)^2). It was further improved to \mathrm(\log(n)^2 \log(\log(n))^) by Paul Pollack and Enrique Treviño in 2018.


Number of representations

The number of representations of a natural number ''n'' as the sum of four squares is denoted by ''r''4(''n'').
Jacobi's four-square theorem Jacobi's four-square theorem gives a formula for the number of ways that a given positive integer ''n'' can be represented as the sum of four squares. History The theorem was proved in 1834 by Carl Gustav Jakob Jacobi. Theorem Two representati ...
states that this is eight times the sum of the
divisor In mathematics, a divisor of an integer n, also called a factor of n, is an integer m that may be multiplied by some integer to produce n. In this case, one also says that n is a multiple of m. An integer n is divisible or evenly divisible by ...
s of ''n'' if ''n'' is odd and 24 times the sum of the odd divisors of ''n'' if ''n'' is even (see
divisor function In mathematics, and specifically in number theory, a divisor function is an arithmetic function related to the divisors of an integer. When referred to as ''the'' divisor function, it counts the ''number of divisors of an integer'' (including ...
), i.e. r_4(n)=\begin8\sum\limits_m&\textn\text\\
2pt PT, Pt, or pt may refer to: Arts and entertainment * ''P.T.'' (video game), acronym for ''Playable Teaser'', a short video game released to promote the cancelled video game ''Silent Hills'' * Porcupine Tree, a British progressive rock group ...
24\sum\limits_m&\textn\text. \end Equivalently, it is eight times the sum of all its divisors which are not divisible by 4, i.e. r_4(n)=8\sum_m. We may also write this as r_4(n) = 8 \sigma(n) -32 \sigma(n/4) \ , where the second term is to be taken as zero if ''n'' is not divisible by 4. In particular, for a
prime number A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
''p'' we have the explicit formula .. Some values of ''r''4(''n'') occur infinitely often as whenever ''n'' is even. The values of ''r''4(''n'')/''n'' can be arbitrarily large: indeed, ''r''4(''n'')/''n'' is infinitely often larger than 8.


Uniqueness

The sequence of positive integers which have only one representation as a sum of four squares (up to order) is: :1, 2, 3, 5, 6, 7, 8, 11, 14, 15, 23, 24, 32, 56, 96, 128, 224, 384, 512, 896 ... . These integers consist of the seven odd numbers 1, 3, 5, 7, 11, 15, 23 and all numbers of the form 2(4^k),6(4^k) or 14(4^k). The sequence of positive integers which cannot be represented as a sum of four ''non-zero'' squares is: :1, 2, 3, 5, 6, 8, 9, 11, 14, 17, 24, 29, 32, 41, 56, 96, 128, 224, 384, 512, 896 ... . These integers consist of the eight odd numbers 1, 3, 5, 9, 11, 17, 29, 41 and all numbers of the form 2(4^k),6(4^k) or 14(4^k).


Further refinements

Lagrange's four-square theorem can be refined in various ways. For example,
Zhi-Wei Sun Sun Zhiwei (, born October 16, 1965) is a Chinese mathematician, working primarily in number theory, combinatorics, and group theory. He is a professor at Nanjing University. Biography Sun Zhiwei was born in Huai'an, Jiangsu. Sun and his twi ...
proved that each natural number can be written as a sum of four squares with some requirements on the choice of these four numbers. One may also wonder whether it is necessary to use the entire set of square integers to write each natural as the sum of four squares.
Eduard Wirsing Eduard Wirsing (28 June 1931 – 22 March 2022) was a German mathematician, specializing in number theory. Biography Wirsing was born on 28 June 1931 in Berlin. Wirsing studied at the University of Göttingen and the Free University of Berlin, w ...
proved that there exists a set of squares with , S, = O(n^\log^ n) such that every positive integer smaller than or equal can be written as a sum of at most 4 elements of .Spencer 1996.


See also

*
Fermat's theorem on sums of two squares In additive number theory, Fermat's theorem on sums of two squares states that an odd prime ''p'' can be expressed as: :p = x^2 + y^2, with ''x'' and ''y'' integers, if and only if :p \equiv 1 \pmod. The prime numbers for which this is true ar ...
* Fermat's polygonal number theorem *
Waring's problem In number theory, Waring's problem asks whether each natural number ''k'' has an associated positive integer ''s'' such that every natural number is the sum of at most ''s'' natural numbers raised to the power ''k''. For example, every natural numb ...
*
Legendre's three-square theorem In mathematics, Legendre's three-square theorem states that a natural number can be represented as the sum of three squares of integers :n = x^2 + y^2 + z^2 if and only if is not of the form n = 4^a(8b + 7) for nonnegative integers and . The ...
* Sum of two squares theorem *
Sum of squares function In number theory, the sum of squares function is an arithmetic function that gives the number of representations for a given positive integer as the sum of squares, where representations that differ only in the order of the summands or in the sign ...
* 15 and 290 theorems


Notes


References

* * * * * * * * * * * * *


External links


Proof at PlanetMath.orgAnother proofan applet decomposing numbers as sums of four squaresOEIS index to sequences related to sums of squares and sums of cubes
{{DEFAULTSORT:Lagrange's Four-Square Theorem Additive number theory Articles containing proofs Squares in number theory Theorems in number theory